from pyspark import SparkConf
from pyspark import SparkContext

conf = SparkConf()
conf.setMaster("local[4]")
conf.setAppName("WordCount")

# sc = SparkContext(master="local[4]", appName="WordCount")
sc = SparkContext(conf)
# rdd = sc.parallelize((1, 2, 3, 4))
# rdd = sc.textFile('file://E:\python_pro\P1905\lizhi\practice\jobs.txt')

rdd = sc.wholeTextFiles('file:///E:\python_pro\P1905\lizhi\practice\words.txt')

print(rdd.collect())
# sc.stop()
